<!doctype html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Windows," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="Win10环境Win10 自定义样式 修改Win10字体大小 修改Console字体http://www.it165.net/os/html/201505/12820.htmlhttp://www.cnblogs.com/nick357/p/3619327.html">
<meta name="keywords" content="Windows">
<meta property="og:type" content="article">
<meta property="og:title" content="Win10笔记">
<meta property="og:url" content="https://gitee.com/icmyfuture/icmyfuture/2017/06/16/win-note/index.html">
<meta property="og:site_name" content="icmyfuture">
<meta property="og:description" content="Win10环境Win10 自定义样式 修改Win10字体大小 修改Console字体http://www.it165.net/os/html/201505/12820.htmlhttp://www.cnblogs.com/nick357/p/3619327.html">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2022-08-12T15:26:27.404Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Win10笔记">
<meta name="twitter:description" content="Win10环境Win10 自定义样式 修改Win10字体大小 修改Console字体http://www.it165.net/os/html/201505/12820.htmlhttp://www.cnblogs.com/nick357/p/3619327.html">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://gitee.com/icmyfuture/icmyfuture/2017/06/16/win-note/"/>





  <title>Win10笔记 | icmyfuture</title>
  














</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">icmyfuture</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">Nothing is true, everthing is permitted</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup">
 <span class="search-icon fa fa-search"></span>
 <input type="text" id="local-search-input" placeholder="search my blog...">
 <div id="local-search-result"></div>
 <span class="popup-btn-close">close</span>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://gitee.com/icmyfuture/icmyfuture/2017/06/16/win-note/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="iDu">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/uploads/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="icmyfuture">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Win10笔记</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-16T16:32:02+08:00">
                2017-06-16
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Technology/" itemprop="url" rel="index">
                    <span itemprop="name">Technology</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="Win10环境"><a href="#Win10环境" class="headerlink" title="Win10环境"></a>Win10环境</h1><h2 id="Win10-自定义样式"><a href="#Win10-自定义样式" class="headerlink" title="Win10 自定义样式"></a>Win10 自定义样式</h2><ul>
<li><a href="http://jingyan.baidu.com/article/47a29f24548575c01523996c.html" target="_blank" rel="noopener">修改Win10字体大小</a></li>
<li>修改Console字体<br><a href="http://www.it165.net/os/html/201505/12820.html" target="_blank" rel="noopener">http://www.it165.net/os/html/201505/12820.html</a><br><a href="http://www.cnblogs.com/nick357/p/3619327.html" target="_blank" rel="noopener">http://www.cnblogs.com/nick357/p/3619327.html</a><a id="more"></a></li>
</ul>
<h2 id="Windows类Mac应用"><a href="#Windows类Mac应用" class="headerlink" title="Windows类Mac应用"></a><a href="http://palmerye.online/%E5%A6%82%E4%BD%95%E5%9C%A8Windows%E4%B8%8B%E5%83%8FMac%E4%B8%80%E6%A0%B7%E4%BC%98%E9%9B%85%E5%BC%80%E5%8F%91/?hmsr=toutiao.io&amp;utm_medium=toutiao.io&amp;utm_source=toutiao.io" target="_blank" rel="noopener">Windows类Mac应用</a></h2><ul>
<li>MacType：更改Windows字体</li>
<li>Listary：类似于mac下的 Spotlight 进行搜索增强</li>
<li>Cmder：命令行增强</li>
<li>QTTabBar：文件浏览器增强</li>
</ul>
<h2 id="gpedit编辑组策略"><a href="#gpedit编辑组策略" class="headerlink" title="gpedit编辑组策略"></a>gpedit编辑组策略</h2><p>计算机配置 -&gt; 管理模块 -&gt; Windows组件 -&gt; Windows更新/Windows Defender防病毒程序</p>
<h2 id="UAC设置"><a href="#UAC设置" class="headerlink" title="UAC设置"></a>UAC设置</h2><p>msconfig -&gt; 工具 -&gt; 更改UAC设置</p>
<h2 id="更改git存储的密码"><a href="#更改git存储的密码" class="headerlink" title="更改git存储的密码"></a>更改git存储的密码</h2><p>控制面板 -&gt; 用户账户 -&gt; 凭证管理器 -&gt; Windows凭证 -&gt; 修改git相关的</p>
<h2 id="创建符号链接"><a href="#创建符号链接" class="headerlink" title="创建符号链接"></a>创建符号链接</h2><p><code>mklink /d linkpath targetpath</code></p>
<h2 id="去掉输入法图标"><a href="#去掉输入法图标" class="headerlink" title="去掉输入法图标"></a>去掉输入法图标</h2><p><a href="https://zhidao.baidu.com/question/2270388044762677588.html" target="_blank" rel="noopener">任务栏</a><br><a href="https://zhidao.baidu.com/question/756157282447550964.html?qbl=relate_question_0" target="_blank" rel="noopener">状态栏</a></p>
<h1 id="Win10软件"><a href="#Win10软件" class="headerlink" title="Win10软件"></a>Win10软件</h1><h2 id="Git-Bash替代CMD"><a href="#Git-Bash替代CMD" class="headerlink" title="Git Bash替代CMD"></a>Git Bash替代CMD</h2><p>设置GIT保存用户名密码，设置commit时候的编辑器<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ git config --global credential.helper winstore或者store</span><br><span class="line">$ git config --global core.editor notepad2或者vim</span><br></pre></td></tr></table></figure></p>
<p><a href="ttp://www.v2ex.com/t/154202" target="_blank" rel="noopener">打造完美GIT命令行环境</a><br>alias：在C:\Program Files\Git\etc\bash.bashrc中配置，使用的是linux风格的命令<br>vim: 在C:\Program Files\Git\etc\vimrc中配置<br><a href="https://www.cnblogs.com/xishuai/p/cmder-git-bash.html" target="_blank" rel="noopener">Cmder with GitBash</a></p>
<h2 id="Listary"><a href="#Listary" class="headerlink" title="Listary"></a>Listary</h2><p>ALT+L 启动Listary</p>
<h2 id="uTools"><a href="#uTools" class="headerlink" title="uTools"></a>uTools</h2><h2 id="WiseHotKey"><a href="#WiseHotKey" class="headerlink" title="WiseHotKey"></a>WiseHotKey</h2><p>ALT+<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line">`: Typora/CLion</span><br><span class="line">1:</span><br><span class="line">2:</span><br><span class="line">3:</span><br><span class="line">4:</span><br><span class="line">5: </span><br><span class="line">Q: Zeal/Velocity/DevDocs</span><br><span class="line">W: GoLand/Android Studio</span><br><span class="line">E: Intellij IDEA/Eclipse</span><br><span class="line">R: PyCharm</span><br><span class="line">T: Console Emulator(cmder\vendor\conemu-maximus5\ConEmu64.exe)</span><br><span class="line">A: DingDing/Tim</span><br><span class="line">S: Sublime Text</span><br><span class="line">D: DataGrip</span><br><span class="line">F: Rider/Explorer/ConEmu64</span><br><span class="line">G: Xshell/Xftp</span><br><span class="line">Z: Pencil/VMware Workstation Pro</span><br><span class="line">X: WPS</span><br><span class="line">C: Chrome</span><br><span class="line">V: Visual Studio Code</span><br><span class="line">B: SumatraPDF/Acrobat Reader DC</span><br><span class="line">Y:</span><br><span class="line">U:</span><br><span class="line">I: Internet Download Manager</span><br><span class="line">O:</span><br><span class="line">P:</span><br><span class="line">H:</span><br><span class="line">J:</span><br><span class="line">K:</span><br><span class="line">N:</span><br><span class="line">M:</span><br></pre></td></tr></table></figure></p>
<p>Win+<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">1: Explorer</span><br><span class="line">2: </span><br><span class="line">3: </span><br><span class="line">4: Remote Desktop Connection Manager(RDCman)</span><br><span class="line">5:</span><br></pre></td></tr></table></figure></p>
<h2 id="JetBrains"><a href="#JetBrains" class="headerlink" title="JetBrains"></a>JetBrains</h2><p><a href="https://www.cnblogs.com/Candies/p/10050831.html" target="_blank" rel="noopener">Crack Method</a></p>
<h2 id="安装MongoDB"><a href="#安装MongoDB" class="headerlink" title="安装MongoDB"></a><a href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/" target="_blank" rel="noopener">安装MongoDB</a></h2><h2 id="安装Sublime-Text-3"><a href="#安装Sublime-Text-3" class="headerlink" title="安装Sublime Text 3"></a>安装Sublime Text 3</h2><p><a href="http://www.zhihu.com/question/40942248" target="_blank" rel="noopener">修改ST3侧边栏和Tab字体大小</a><br>Terminal Setting<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;terminal&quot;: &quot;C:\\cygwin64\\bin\\mintty.exe&quot;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<h2 id="Nginx-Windows-配置"><a href="#Nginx-Windows-配置" class="headerlink" title="Nginx Windows 配置"></a><a href="http://blog.csdn.net/huangxiangec/article/details/41597481" target="_blank" rel="noopener">Nginx Windows 配置</a></h2><p>nginx默认80端口，可在conf/nginx.conf中配置，如果80端口被占用（比如IIS），则会启动失败</p>
<h2 id="Global-NodeJS-Modules-Path"><a href="#Global-NodeJS-Modules-Path" class="headerlink" title="Global NodeJS Modules Path"></a>Global NodeJS Modules Path</h2><p>C:\Users\admin\AppData\Roaming\npm\node_modules</p>
<h2 id="IDM"><a href="#IDM" class="headerlink" title="IDM"></a><a href="https://greasyfork.org/zh-CN/scripts/418182-%E7%99%BE%E5%BA%A6%E7%BD%91%E7%9B%98%E7%AE%80%E6%98%93%E4%B8%8B%E8%BD%BD%E5%8A%A9%E6%89%8B-%E7%9B%B4%E9%93%BE%E4%B8%8B%E8%BD%BD%E5%A4%8D%E6%B4%BB%E7%89%88" target="_blank" rel="noopener">IDM</a></h2><p>default UA<br><figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko</span><br></pre></td></tr></table></figure></p>
<h2 id="Hexo搭建博客"><a href="#Hexo搭建博客" class="headerlink" title="Hexo搭建博客"></a><a href="https://hexo.io/zh-cn/" target="_blank" rel="noopener">Hexo搭建博客</a></h2><p><a href="https://www.jianshu.com/p/13c0b3ca7c71" target="_blank" rel="noopener">安装nvm</a><br><a href="https://www.jianshu.com/p/68177749d33f" target="_blank" rel="noopener">部署问题</a><br>nodejs版本使用v12.14.0<br><a href="https://www.jianshu.com/p/09441e35a59f" target="_blank" rel="noopener">gitee博客</a><br><a href="https://icmyfuture.github.io/" target="_blank" rel="noopener">blog地址</a><br>文本仓库: <a href="https://gitee.com/icmyfuture/blog">https://gitee.com/icmyfuture/blog</a><br>博客仓库:<br>    <a href="https://gitee.com/icmyfuture/icmyfuture/pages">https://gitee.com/icmyfuture/icmyfuture/pages</a><br>    <a href="https://github.com/icmyfuture/icmyfuture.github.io" target="_blank" rel="noopener">https://github.com/icmyfuture/icmyfuture.github.io</a><br>github token: ghp_0ST55WR#3#jecPFk5aa8#MHL6TQ88q11gnTq 其中 <em>00</em>#00#<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ git remote add github https://TOKEN@github.com/icmyfuture/icmyfuture.github.io.git</span><br><span class="line">$ git push -f github</span><br></pre></td></tr></table></figure></p>
<h2 id="允许其他机器ping"><a href="#允许其他机器ping" class="headerlink" title="允许其他机器ping"></a><a href="http://www.jb51.net/os/win10/300048.html" target="_blank" rel="noopener">允许其他机器ping</a></h2><h2 id="PHP-in-Win10"><a href="#PHP-in-Win10" class="headerlink" title="PHP in Win10"></a><a href="http://blog.csdn.net/fightvictory/article/details/51895828" target="_blank" rel="noopener">PHP in Win10</a></h2><h2 id="Windows-CLion-Cygwin"><a href="#Windows-CLion-Cygwin" class="headerlink" title="Windows CLion+Cygwin"></a><a href="http://blog.csdn.net/shouwangzhelv/article/details/54919235" target="_blank" rel="noopener">Windows CLion+Cygwin</a></h2><p>当遇到git commit 出现 input is not from a terminal错误时，需要从cygwin安装程序中为cygwin环境安装git，而不是使用windows环境的git<br><a href="http://blog.csdn.net/taanng/article/details/42216993" target="_blank" rel="noopener">apt-cyg安装其他包</a><br>使用地址 <a href="https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg" target="_blank" rel="noopener">https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg</a><br><a href="http://unitstep.net/blog/2009/05/16/open-cygwin-bash-shell-here/" target="_blank" rel="noopener">Cygwin here</a><br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">chere -i -t mintty</span><br></pre></td></tr></table></figure></p>
<h2 id="OpenVPN多连接"><a href="#OpenVPN多连接" class="headerlink" title="OpenVPN多连接"></a><a href="https://blog.rj-bai.com/post/79.html" target="_blank" rel="noopener">OpenVPN多连接</a></h2><p>将配置文件目录拷贝至 <code>C:\Program Files\OpenVPN\config\</code>，注意多个目录中得ovpn文件不能同名</p>
<h2 id="VS-2015-KEY"><a href="#VS-2015-KEY" class="headerlink" title="VS 2015 KEY"></a>VS 2015 KEY</h2><p>Visual Studio Professional 2015简体中文版（专业版）<br>KEY：HMGNV-WCYXV-X7G9W-YCX63-B98R2<br>Visual Studio Enterprise 2015简体中文版（企业版）<br>KEY：HM6NR-QXX7C-DFW2Y-8B82K-WTYJV</p>
<h2 id="VS-2019-KEY"><a href="#VS-2019-KEY" class="headerlink" title="VS 2019 KEY"></a>VS 2019 KEY</h2><p>Enterprise: BF8Y8-GN2QH-T84XB-QVY3B-RC4DF</p>
<h2 id="VS-Key-Required-问题"><a href="#VS-Key-Required-问题" class="headerlink" title="VS Key Required 问题"></a>VS Key Required 问题</h2><p>由 Visual Assist 插件引起，在VS快捷方式后加上 /safemode，启动VS后卸载或禁用VA插件</p>
<h2 id="VS2019-ASP-NET-MVC-4-App-Error"><a href="#VS2019-ASP-NET-MVC-4-App-Error" class="headerlink" title="VS2019 ASP.NET MVC 4 App Error"></a>VS2019 ASP.NET MVC 4 App Error</h2><p>CS0012: 类型“System.Object”在未被引用的程序集中定义。必须添加对程序集“netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51”的引用<br>Copied “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\Facades\netstandard.dll” to your application bin directory</p>
<h2 id="VSCode-Settings-Sync"><a href="#VSCode-Settings-Sync" class="headerlink" title="VSCode Settings Sync"></a>VSCode Settings Sync</h2><p>安装vscode插件: Settings Sync<br>vscode-setting-sync: 460b55de988723f98b9e188b7285e0c4929d1866</p>
<h2 id="VSCode-Java-C-Bulid-amp-Debug-Setting"><a href="#VSCode-Java-C-Bulid-amp-Debug-Setting" class="headerlink" title="VSCode Java/C Bulid&amp;Debug Setting"></a>VSCode Java/C Bulid&amp;Debug Setting</h2><p>tasks.json<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    &quot;version&quot;: &quot;2.0.0&quot;,</span><br><span class="line">    &quot;tasks&quot;:</span><br><span class="line">    [</span><br><span class="line">        &#123;</span><br><span class="line">            &quot;label&quot;: &quot;Build Java&quot;,</span><br><span class="line">            &quot;type&quot;: &quot;shell&quot;,</span><br><span class="line">            &quot;command&quot;: &quot;javac&quot;,</span><br><span class="line">            &quot;args&quot;: [</span><br><span class="line">                &quot;-g&quot;,</span><br><span class="line">                &quot;$pwd/jivan/src/*.java&quot;</span><br><span class="line">            ]</span><br><span class="line">        &#125;,</span><br><span class="line">        &#123;</span><br><span class="line">            &quot;label&quot;: &quot;Build C&quot;,</span><br><span class="line">            &quot;type&quot;: &quot;shell&quot;,</span><br><span class="line">            &quot;command&quot;: &quot;gcc&quot;,</span><br><span class="line">            &quot;args&quot;: [</span><br><span class="line">                &quot;-g&quot;,</span><br><span class="line">                &quot;$pwd/civan/*.c&quot;,</span><br><span class="line">                &quot;-o&quot;,</span><br><span class="line">                &quot;$pwd/civan/main.sh&quot;</span><br><span class="line">            ]</span><br><span class="line">        &#125;</span><br><span class="line">    ]</span><br><span class="line">&#125;&#125;</span><br></pre></td></tr></table></figure></p>
<p>launch.json<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    // 使用 IntelliSense 了解相关属性。</span><br><span class="line">    // 悬停以查看现有属性的描述。</span><br><span class="line">    // 欲了解更多信息，请访问: https://go.microsoft.com/fwlink/?linkid=830388</span><br><span class="line">    &quot;version&quot;: &quot;0.2.0&quot;,</span><br><span class="line">    &quot;configurations&quot;: [</span><br><span class="line">        &#123;</span><br><span class="line">            &quot;name&quot;: &quot;java (Launch)&quot;,</span><br><span class="line">            &quot;type&quot;: &quot;java&quot;,</span><br><span class="line">            &quot;request&quot;: &quot;launch&quot;,</span><br><span class="line">            &quot;cwd&quot;: &quot;$&#123;workspaceFolder&#125;&quot;,</span><br><span class="line">            &quot;console&quot;: &quot;internalConsole&quot;,</span><br><span class="line">            &quot;stopOnEntry&quot;: false,</span><br><span class="line">            &quot;mainClass&quot;: &quot;Main&quot;,</span><br><span class="line">            &quot;classPaths&quot;: [</span><br><span class="line">                &quot;C:\\src\\git\\jivan\\src&quot;</span><br><span class="line">            ],</span><br><span class="line">            &quot;sourcePaths&quot;: [&quot;$&#123;workspaceFolder&#125;/jivan/src&quot;],</span><br><span class="line">            &quot;args&quot;: &quot;&quot;,</span><br><span class="line">            &quot;preLaunchTask&quot;: &quot;Build Java&quot;</span><br><span class="line">        &#125;,</span><br><span class="line">        &#123;</span><br><span class="line">            &quot;name&quot;: &quot;c (Launch)&quot;,</span><br><span class="line">            &quot;type&quot;: &quot;cppdbg&quot;,</span><br><span class="line">            &quot;request&quot;: &quot;launch&quot;,</span><br><span class="line">            &quot;program&quot;: &quot;$&#123;workspaceFolder&#125;/CIvan/main.sh&quot;,</span><br><span class="line">            &quot;args&quot;: [],</span><br><span class="line">            &quot;stopAtEntry&quot;: false,</span><br><span class="line">            &quot;cwd&quot;: &quot;$&#123;workspaceFolder&#125;&quot;,</span><br><span class="line">            &quot;environment&quot;: [],</span><br><span class="line">            &quot;externalConsole&quot;: true,</span><br><span class="line">            &quot;MIMode&quot;: &quot;gdb&quot;,</span><br><span class="line">            &quot;miDebuggerPath&quot;: &quot;C:/cygwin64/bin/gdb.exe&quot;,</span><br><span class="line">            &quot;setupCommands&quot;: [</span><br><span class="line">                &#123;</span><br><span class="line">                    &quot;description&quot;: &quot;Enable pretty-printing for gdb&quot;,</span><br><span class="line">                    &quot;text&quot;: &quot;-enable-pretty-printing&quot;,</span><br><span class="line">                    &quot;ignoreFailures&quot;: true</span><br><span class="line">                &#125;</span><br><span class="line">            ],</span><br><span class="line">            &quot;preLaunchTask&quot;: &quot;Build C&quot;</span><br><span class="line">        &#125;</span><br><span class="line">    ]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<h2 id="MarkDown编辑器Yu-Writer"><a href="#MarkDown编辑器Yu-Writer" class="headerlink" title="MarkDown编辑器Yu Writer"></a>MarkDown编辑器<a href="https://ivarptr.github.io/yu-writer.site/" target="_blank" rel="noopener">Yu Writer</a></h2><h2 id="etcd"><a href="#etcd" class="headerlink" title="etcd"></a><a href="https://www.codenong.com/cs106193128/" target="_blank" rel="noopener">etcd</a></h2><h2 id="Quarkus"><a href="#Quarkus" class="headerlink" title="Quarkus"></a><a href="https://quarkus.io/get-started/" target="_blank" rel="noopener">Quarkus</a></h2><h3 id="环境"><a href="#环境" class="headerlink" title="环境"></a>环境</h3><p>windows 10</p>
<h4 id="jdk"><a href="#jdk" class="headerlink" title="jdk"></a>jdk</h4><p><a href="https://adoptopenjdk.net/" target="_blank" rel="noopener">openjdk11</a><br><a href="https://www.graalvm.org/" target="_blank" rel="noopener">graalvm</a><br><a href="https://blog.csdn.net/weixin_45813747/article/details/115310800" target="_blank" rel="noopener">jdk8_jk811_switch</a><br>GitBash 设置jdk快速切换<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">$ vim ~/.bashrc</span><br><span class="line"><span class="built_in">alias</span> j8=<span class="string">'export PATH="/c/Program Files/Java/jdk1.8.0_212/bin:$PATH"'</span></span><br><span class="line"><span class="built_in">alias</span> j11=<span class="string">'export PATH="/c/Program Files/AdoptOpenJDK/jdk-11.0.11.9-hotspot/bin:$PATH"'</span></span><br><span class="line"><span class="built_in">alias</span> j11g=</span><br><span class="line">:wq</span><br><span class="line"></span><br><span class="line">$ <span class="built_in">source</span> ~/.bashrc</span><br><span class="line"></span><br><span class="line">$ j8</span><br><span class="line">$ java -version</span><br><span class="line"></span><br><span class="line">$ j11</span><br><span class="line">$ java -version</span><br></pre></td></tr></table></figure></p>
<h4 id="maven"><a href="#maven" class="headerlink" title="maven"></a>maven</h4><p><a href="https://maven.apache.org/download.cgi" target="_blank" rel="noopener">Maven</a><br><a href="https://www.cnblogs.com/wkrbky/p/6350334.html" target="_blank" rel="noopener">HowToInstall</a></p>
<h4 id="IDE"><a href="#IDE" class="headerlink" title="IDE"></a>IDE</h4><h5 id="vscode"><a href="#vscode" class="headerlink" title="vscode"></a>vscode</h5><p>install <code>quarkus</code> extension in <code>View &gt; Extensions</code></p>
<h5 id="IDEA"><a href="#IDEA" class="headerlink" title="IDEA"></a>IDEA</h5><p>install <code>quarkus tools</code> plugin in <code>Files &gt; Settings &gt; Plugins</code></p>
<h3 id="scaffold"><a href="#scaffold" class="headerlink" title="scaffold"></a>scaffold</h3><p><a href="https://code.quarkus.io/?g=cn.icmyfuture" target="_blank" rel="noopener">https://code.quarkus.io/?g=cn.icmyfuture</a></p>
<h3 id="debug"><a href="#debug" class="headerlink" title="debug"></a>debug</h3><p>IDEA debug by following <a href="http://www.kailing.pub/article/index/arcid/286.html" target="_blank" rel="noopener">this</a> or <a href="https://www.jetbrains.com/help/idea/quarkus.html#new-project" target="_blank" rel="noopener">this</a></p>
<h2 id="Docker-for-Windows"><a href="#Docker-for-Windows" class="headerlink" title="Docker for Windows"></a><a href="https://www.docker.com/products/docker-desktop" target="_blank" rel="noopener">Docker for Windows</a></h2><p><a href="https://blog.csdn.net/weixin_43792738/article/details/113845702" target="_blank" rel="noopener">参考</a><br><a href="https://blog.csdn.net/u010840685/article/details/117028793" target="_blank" rel="noopener">参考</a><br><a href="https://github.com/AliyunContainerService/k8s-for-docker-desktop" target="_blank" rel="noopener">k8s for docker desktop</a></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Windows/" rel="tag"># Windows</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/06/16/mac-note/" rel="next" title="Mac笔记">
                <i class="fa fa-chevron-left"></i> Mac笔记
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/06/19/st-note/" rel="prev" title="Sublime Text 杂记">
                Sublime Text 杂记 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/uploads/avatar.jpg"
               alt="iDu" />
          <p class="site-author-name" itemprop="name">iDu</p>
           
              <p class="site-description motion-element" itemprop="description">诗酒风流品花月</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">23</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/categories/index.html">
                <span class="site-state-item-count">3</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">7</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/icmyfuture" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://weibo.com/u/1865769731" target="_blank" title="Weibo">
                  
                    <i class="fa fa-fw fa-weibo"></i>
                  
                  Weibo
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#Win10环境"><span class="nav-number">1.</span> <span class="nav-text">Win10环境</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Win10-自定义样式"><span class="nav-number">1.1.</span> <span class="nav-text">Win10 自定义样式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Windows类Mac应用"><span class="nav-number">1.2.</span> <span class="nav-text">Windows类Mac应用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#gpedit编辑组策略"><span class="nav-number">1.3.</span> <span class="nav-text">gpedit编辑组策略</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#UAC设置"><span class="nav-number">1.4.</span> <span class="nav-text">UAC设置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#更改git存储的密码"><span class="nav-number">1.5.</span> <span class="nav-text">更改git存储的密码</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#创建符号链接"><span class="nav-number">1.6.</span> <span class="nav-text">创建符号链接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#去掉输入法图标"><span class="nav-number">1.7.</span> <span class="nav-text">去掉输入法图标</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Win10软件"><span class="nav-number">2.</span> <span class="nav-text">Win10软件</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Git-Bash替代CMD"><span class="nav-number">2.1.</span> <span class="nav-text">Git Bash替代CMD</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Listary"><span class="nav-number">2.2.</span> <span class="nav-text">Listary</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#uTools"><span class="nav-number">2.3.</span> <span class="nav-text">uTools</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#WiseHotKey"><span class="nav-number">2.4.</span> <span class="nav-text">WiseHotKey</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#JetBrains"><span class="nav-number">2.5.</span> <span class="nav-text">JetBrains</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装MongoDB"><span class="nav-number">2.6.</span> <span class="nav-text">安装MongoDB</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装Sublime-Text-3"><span class="nav-number">2.7.</span> <span class="nav-text">安装Sublime Text 3</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Nginx-Windows-配置"><span class="nav-number">2.8.</span> <span class="nav-text">Nginx Windows 配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Global-NodeJS-Modules-Path"><span class="nav-number">2.9.</span> <span class="nav-text">Global NodeJS Modules Path</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#IDM"><span class="nav-number">2.10.</span> <span class="nav-text">IDM</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Hexo搭建博客"><span class="nav-number">2.11.</span> <span class="nav-text">Hexo搭建博客</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#允许其他机器ping"><span class="nav-number">2.12.</span> <span class="nav-text">允许其他机器ping</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#PHP-in-Win10"><span class="nav-number">2.13.</span> <span class="nav-text">PHP in Win10</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Windows-CLion-Cygwin"><span class="nav-number">2.14.</span> <span class="nav-text">Windows CLion+Cygwin</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#OpenVPN多连接"><span class="nav-number">2.15.</span> <span class="nav-text">OpenVPN多连接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VS-2015-KEY"><span class="nav-number">2.16.</span> <span class="nav-text">VS 2015 KEY</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VS-2019-KEY"><span class="nav-number">2.17.</span> <span class="nav-text">VS 2019 KEY</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VS-Key-Required-问题"><span class="nav-number">2.18.</span> <span class="nav-text">VS Key Required 问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VS2019-ASP-NET-MVC-4-App-Error"><span class="nav-number">2.19.</span> <span class="nav-text">VS2019 ASP.NET MVC 4 App Error</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VSCode-Settings-Sync"><span class="nav-number">2.20.</span> <span class="nav-text">VSCode Settings Sync</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VSCode-Java-C-Bulid-amp-Debug-Setting"><span class="nav-number">2.21.</span> <span class="nav-text">VSCode Java/C Bulid&amp;Debug Setting</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#MarkDown编辑器Yu-Writer"><span class="nav-number">2.22.</span> <span class="nav-text">MarkDown编辑器Yu Writer</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#etcd"><span class="nav-number">2.23.</span> <span class="nav-text">etcd</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Quarkus"><span class="nav-number">2.24.</span> <span class="nav-text">Quarkus</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#环境"><span class="nav-number">2.24.1.</span> <span class="nav-text">环境</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#jdk"><span class="nav-number">2.24.1.1.</span> <span class="nav-text">jdk</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#maven"><span class="nav-number">2.24.1.2.</span> <span class="nav-text">maven</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#IDE"><span class="nav-number">2.24.1.3.</span> <span class="nav-text">IDE</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#vscode"><span class="nav-number">2.24.1.3.1.</span> <span class="nav-text">vscode</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#IDEA"><span class="nav-number">2.24.1.3.2.</span> <span class="nav-text">IDEA</span></a></li></ol></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#scaffold"><span class="nav-number">2.24.2.</span> <span class="nav-text">scaffold</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#debug"><span class="nav-number">2.24.3.</span> <span class="nav-text">debug</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Docker-for-Windows"><span class="nav-number">2.25.</span> <span class="nav-text">Docker for Windows</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2025</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">iDu</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.1"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'manual') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  

  

  

</body>
</html>
